var express = require('express');
var router = express.Router();
const db = require('../database/db');
const { log } = require('node:console');

/* GET home page. */
router.get('/', function(req, res, next) {
  try {
    var sql = `SELECT * FROM user LIMIT 0,1000`
  db.query(sql,(err,data)=>{
      res.send(res.json({code:200,data:data}))
      res.json({code:200,data:data})
  })
  } catch (error) {
    console.log(error);
    
  }

});

module.exports = router;
